clc
close all
clear all

%This example shows how to build a simple molecular and write its atom coordinates to a xyz file

angle = 104.4 * pi/180;
OH = 1;

obj = NanoObj([0,0,0],'O');

P1 = [OH*cos(angle/2),OH*sin(angle/2),0];
P2 = [OH*cos(angle/2),-OH*sin(angle/2),0];
obj.add_atom(P1,'H');
obj.add_atom(P2,'H');
obj.plot('vmd');

